Azure Application Gateway: Networking Configuration

Azure Application Gateway is a managed web traffic load balancer that enables you to manage traffic to your web applications. It allows you to route end-user traffic to specific backend resources.

Key Networking Concepts

1. Frontend IP Configuration

This defines the IP address(es) that Application Gateway will listen on for incoming traffic. You can configure it with a public IP address, a private IP address, or both.

2. Listener

A listener is a logical component that checks for incoming requests. It inspects requests based on the listener's IP address, port, and protocol. You must associate a listener with a frontend IP configuration.

3. Backend Pool

The backend pool contains the virtual machines, virtual machine scale sets, web apps, or any other Azure resource that hosts your application's services.

4. HTTP Settings

HTTP settings define how Application Gateway forwards requests to the backend targets. They include protocol, port, cookie-based affinity, connection draining, and health probe settings.

5. Health Probes

Health probes are essential for monitoring the health of your backend servers. Application Gateway periodically probes the backend servers to determine their availability and health status.

Tip: Configure comprehensive health probes to ensure traffic is only sent to healthy backend instances, enhancing application availability.

Routing Rules

Routing rules tie together the listener, backend pool, and HTTP settings to define how requests are processed. Application Gateway supports two types of routing rules:

Example Configuration Snippet (Conceptual)

        <!-- This is a conceptual example, actual configuration is done via Azure portal, CLI, or ARM templates -->
        {
          "frontendIPConfigurations": [
            {
              "name": "publicFrontend",
              "properties": {
                "publicIPAddress": {
                  "id": "/subscriptions/.../resourceGroups/.../providers/Microsoft.Network/publicIPAddresses/my-public-ip"
                }
              }
            }
          ],
          "listeners": [
            {
              "name": "httpListener",
              "properties": {
                "frontendIPConfiguration": {
                  "id": "/subscriptions/.../resourceGroups/.../providers/Microsoft.Network/applicationGateways/.../frontendIPConfigurations/publicFrontend"
                },
                "frontendPort": {
                  "id": "/subscriptions/.../resourceGroups/.../providers/Microsoft.Network/applicationGateways/.../frontendPorts/port80"
                },
                "protocol": "Http"
              }
            }
          ],
          "backendAddressPools": [
            {
              "name": "appBackendPool",
              "properties": {
                "backendIPConfigurations": [],
                "backendAddresses": [
                  {
                    "ipAddress": "10.0.0.4"
                  },
                  {
                    "ipAddress": "10.0.0.5"
                  }
                ]
              }
            }
          ],
          "httpSettings": [
            {
              "name": "appHTTPsSettings",
              "properties": {
                "protocol": "Http",
                "port": 80,
                "cookieBasedAffinity": "Disabled",
                "requestTimeout": 20,
                "probe": {
                  "id": "/subscriptions/.../resourceGroups/.../providers/Microsoft.Network/applicationGateways/.../httpProbes/appProbe"
                }
              }
            }
          ],
          "requestRoutingRules": [
            {
              "name": "rule1",
              "properties": {
                "listener": {
                  "id": "/subscriptions/.../resourceGroups/.../providers/Microsoft.Network/applicationGateways/.../listeners/httpListener"
                },
                "backendAddressPool": {
                  "id": "/subscriptions/.../resourceGroups/.../providers/Microsoft.Network/applicationGateways/.../backendAddressPools/appBackendPool"
                },
                "httpSettings": {
                  "id": "/subscriptions/.../resourceGroups/.../providers/Microsoft.Network/applicationGateways/.../httpSettings/appHTTPsSettings"
                }
              }
            }
          ]
        }
        
Note: Application Gateway requires a subnet within your virtual network for its deployment. This subnet cannot contain any other resources.

Next Steps

Explore the following resources for deeper insights:

← Previous: Virtual Networks Next: Load Balancer →