You configure an Azure Application Gateway v2 to distribute traffic to a backend pool of virtual machines. The web application hosted on the virtual machines requires authentication at the root directory () and returns an HTTP (Unauthorized) response to unauthenticated requests. As a result, the default Application Gateway health probes fail, and the backend pool is marked as unhealthy. You need to ensure the Application Gateway correctly identifies the backend servers as healthy. What should you do?
- AAdd a user-defined route (UDR) to the Application Gateway subnet with the next hop type set to Virtual Network Gateway to redirect probe traffic.
- BCreate an inbound network security group (NSG) rule on the Application Gateway subnet with a priority of to allow traffic from the Virtual Network Manager service tag.
- Create a custom health probe that targets an unauthenticated status endpoint, and associate the probe with the backend settings.Answer
- DConfigure virtual network peering transit settings to allow the health probe traffic to route transitively through an Azure Firewall.
Answer
Create a custom health probe that targets an unauthenticated status endpoint, and associate the probe with the backend settings.
The correct configuration is to create a custom health probe that targets an unauthenticated status endpoint (or accommodates the expected HTTP status code) and associate this probe with the backend settings of the Application Gateway. By default, Application Gateway expects HTTP status codes between and . An application-level authentication requirement returning HTTP will cause the default probe to fail, which is resolved by pointing the probe to a bypass or health-check page.
Step-by-Step Solution
Key Concept
Configure custom health probes for Azure Application Gateway