Cloud Notes: Azure Application Gateway
Published: 2023-04-08
Intro
Azure Application Gateway is a Layer 7 load balancing service for HTTP/S and HTTP2 traffic.
Features
Application Gateways have the following characteristics.
- Application Gateway is a Regional service.
- There are 2x versions (SKU's) available: v1 and v2.
- Supports both Public and/or Private IP addressing for the Frontend.
- Supports Virtual Machines (VMs), VM Scale Sets (VMSS), App Service, IP Address or FQDNs as Backend pool members.
- Optionally, can be deployed with Web Application Firewall (WAF) functionality.
- Can load balance across Availability Zones (AZs) within a Region.
- Supports both Host and Path based routing.
- Multi-Site hosting is supported. IE an App Gateway can be the Frontend for multiple different websites.
- Supports both TLS termination and End-to-End TLS encryption.
v1 v2 Comparison
v2 App Gateways have the same features as v1 App Gateways with some additional functionality.
v1
v2
Listeners
Listeners determine which traffic is load balanced using the following parameters.
- IP Addreess - X.X.X.X
- Port number - 80/443
- Protocol - HTTP/S/2
- Host - www.stratuslabs.net
There are 2 types of Listeners: Basic and Multi-Site.
Basic
Basic listeners have the following characteristics.
- Used for hosting a single website.
- Single domain support.
- Single DNS mapping to an IP address.
Multi-Site
Multi-Site listeners have the following characteristics.
- Used for hosting a single website.
- Multiple domains/hostnames support.
- Can host 100+ sites on a single App Gateway.
- Limited to 5 hostnames per-listener.
Rules
Rules determine how to Route traffic to a Backend and have the following characteristics.
- HTTP settings, such as TLS termination of the Backend connection are defined.
- Backend Targets are selected.
- Backend Health Probes are attached to Rules.
- Host-based, Path-based, Redirection and URL rewrite configuration are defined.
Health Probes
Health Probes are used to monitor Backend health at the application layer and have the following characteristics.
- Resources considered unhealthy are automatically removed from the pool. Once healthy again, they are automatically added back into the pool.
- A default health probe is automatically configured to make a HTTP GET request to the IP or FQDN configured in the backend pool.
- Custom health probes allow you to define granular controls on how health probes operate.
Architecture
The following diagrams show a command Application Gateway deployment architecture.

The following points summarize the above diagram.
- A multi-site Application Gateway (AGW) is hosting www.stuff.net and www.things.net
- Users browse to the domain and DNS resolves to the Public IP address (PIP) of the AGW.
- The Listener tied to each domain determines if the AGW is load balance the traffic. The Listener also points to the Routing rule used for the Backend pool.
- Routing rules determine how traffic is routed to the backend pool.
- Backend Pool members serve traffic for their respective domains.
Considerations
Application Gateways have the following considerations.
- Application Gateways are deployed into a dedicated Subnet within a Virtual Network (VNet).
- Multiple App Gateways can be deployed in the Subnet. However, The Subnet cannot be shared with Non Application Gateway Resources.
- v1 and v2 App Gateways cannot share the same Subnet.
- v1 App Gateways require a minimum /26 subnet.
- It is recommended to install v2 App Gateways in a /24 Subnet to ensure sufficient address space is available for scaling.
- A maximum of 40 listeners are recommended per Application Gateway.
Links
https://learn.acloud.guru/course/az-700-microsoft-azure-network-engineer-associate/
https://learn.microsoft.com/en-us/azure/application-gateway/overview
https://learn.microsoft.com/en-us/azure/application-gateway/
https://learn.microsoft.com/en-us/azure/application-gateway/configuration-infrastructure
https://learn.microsoft.com/en-us/azure/application-gateway/url-route-overview
https://learn.microsoft.com/en-us/azure/application-gateway/multiple-site-overview
https://learn.microsoft.com/en-us/azure/web-application-firewall/ag/ag-overview
https://learn.microsoft.com/en-us/azure/application-gateway/features
https://learn.microsoft.com/en-us/azure/application-gateway/key-vault-certs
https://learn.microsoft.com/en-us/azure/application-gateway/application-gateway-probe-overview