A scalable, fully managed application delivery controller (ADC) that helps you manage traffic to your web applications.
Azure Application Gateway is a managed application load balancer that enables you to manage traffic to your web applications. It provides features such as load balancing, Web Application Firewall (WAF), SSL termination, and cookie-based session affinity. It operates at Layer 7 (HTTP/S) and can route traffic based on various parameters like URL path, host name, and HTTP headers.
/api to one set of servers, /images to another).An Application Gateway consists of the following key components:
You can deploy Application Gateway in two modes: Standard V2 and WAF V2. WAF V2 offers enhanced security features with an integrated Web Application Firewall.
Deploying an Application Gateway can be done through the Azure portal, Azure CLI, PowerShell, or ARM templates.
1. Navigate to the Azure portal and search for "Application Gateway".
2. Click "Create".
3. Configure the Basics tab: Subscription, Resource Group, Name, Region, SKU (Standard V2 or WAF V2), Gateway scale.
4. Configure the Frontend tab: Frontend IP address (Public or Private).
5. Configure the Backend tab: Backend pools and Backend HTTP settings.
6. Configure the Configuration tab: Routing rules, listeners, and priority.
7. Configure Tags and Review + create.
az group create --name myResourceGroup --location westus2
az network application-gateway create \
--name myAppGateway \
--resource-group myResourceGroup \
--location westus2 \
--sku Standard_V2 \
--public-ip-address myAppGatewayPublicIP \
--vnet-name myVNet \
--subnet myAppGatewaySubnet \
--frontend-port 80 \
--backend-port 80 \
--routing-rule
Ensure you have a Virtual Network (VNet) and a dedicated subnet for the Application Gateway. The subnet must be dedicated solely to the Application Gateway and cannot contain any other resources.
You can upload your own SSL certificates or use Azure Key Vault for certificate management. This is crucial for enabling HTTPS listeners and end-to-end SSL encryption.
For WAF V2 SKU, you can create custom WAF policies to define rulesets (e.g., OWASP Core Rule Set), bot protection, and custom rules to tailor security to your application's needs.
Configure detailed health probes to ensure the Application Gateway accurately monitors backend server health. You can specify probe intervals, unhealthy threshold, and valid status codes.
# Example of a custom health probe configuration
{
"name": "myHealthProbe",
"properties": {
"protocol": "Https",
"host": "www.example.com",
"path": "/health",
"interval": 30,
"timeout": 15,
"unhealthyThreshold": 3,
"pickHttpSettings": true
}
}
Azure Application Gateway provides comprehensive monitoring capabilities:
Azure Application Gateway pricing is based on the SKU (Standard V2, WAF V2), the amount of data processed, and the hourly cost of the gateway. Visit the Azure Application Gateway pricing page for the most up-to-date information.
Key pricing factors include: