Azure Documentation

Configuring Backend Pools in Azure Application Gateway

Backend pools are fundamental to how Azure Application Gateway directs traffic. They define the collection of backend resources that will receive traffic routed by the gateway. This document provides a comprehensive guide on understanding and configuring backend pools.

What is a Backend Pool?

A backend pool is a logical grouping of backend servers. Application Gateway uses backend pools to determine which servers should receive incoming requests for a specific listener and rule. You can configure backend pools to include virtual machines, virtual machine scale sets, app services, or even external IP addresses.

Types of Backend Targets

Application Gateway supports several types of backend targets:

Creating a Backend Pool

You can create backend pools through the Azure portal, Azure CLI, or PowerShell.

Using the Azure Portal:

  1. Navigate to your Application Gateway resource in the Azure portal.
  2. In the left-hand menu, under "Settings," select "Backend pools."
  3. Click "+ Add" to create a new backend pool.
  4. Provide a descriptive name for the backend pool.
  5. Select the "Backend targets" type (IP address/FQDN, VMSS, etc.).
  6. Add the IP addresses, FQDNs, or select the VMSS/App Service instances you want to include.
  7. Configure the "HTTP settings" for this backend pool. This includes protocol, port, and cookie-based affinity.
  8. Click "Add" to save the backend pool.

Note: When using IP addresses, ensure they are reachable from the Application Gateway's subnet. For FQDNs, ensure the DNS resolution works correctly within your VNet.

Configuring Backend HTTP Settings

When you add a backend pool, you also need to configure its associated HTTP settings. These settings determine how Application Gateway communicates with the backend servers. Key settings include:

Health Probes and Backend Pools

Application Gateway uses health probes to determine the health of backend servers within a pool. If a server is unhealthy, Application Gateway will stop sending traffic to it until it becomes healthy again. It's crucial to configure health probes that accurately reflect the health of your application.

Tip: For applications using HTTPS, ensure that the backend HTTP settings are configured correctly to trust the backend server's SSL certificate, or configure a custom probe that checks the SSL certificate validity.

Backend Pool Management Best Practices

Important: When targeting IP addresses or FQDNs that are within your virtual network, ensure that Network Security Groups (NSGs) and firewalls allow traffic from the Application Gateway's subnet to your backend servers on the specified ports.

By effectively configuring backend pools, you can ensure that your applications are highly available, scalable, and performant.