Question

Difficulty: MediumConfigure Azure Application Gateway

An administrator is configuring an Azure Application Gateway v2 named AppGw1. The administrator needs to configure path-based routing for a web application to meet the following requirements:
- Traffic to contoso.com/images/* must route to a backend pool named PoolImages.
- Traffic to contoso.com/videos/* must route to a backend pool named PoolVideos.
- All other traffic must route to a backend pool named PoolDefault.

Which routing rule type and configuration should the administrator use on AppGw1?

  1. A
    A basic routing rule with three listeners, one for each path, and three separate backend pools.
  2. A path-based routing rule with a path map that defines paths for /images/* and /videos/* pointing to their respective backend pools, and PoolDefault configured as the default backend target.Answer
  3. C
    A path-based routing rule with a multi-site listener for each path and a single backend settings association.
  4. D
    A basic routing rule with a single multi-site listener and custom health probes configured for each path.

Answer

A path-based routing rule with a path map that defines paths for /images/* and /videos/* pointing to their respective backend pools, and PoolDefault configured as the default backend target.
A path-based routing rule allows Azure Application Gateway to evaluate the path pattern of incoming request URLs (such as /images/* or /videos/*) and forward them to corresponding backend pools. Any traffic that does not match the specified path patterns is automatically directed to the default backend target (PoolDefault).

Step-by-Step Solution

1
Determine the routing requirements.
Identify that traffic needs to be routed to different backend pools based on the URL path segment (e.g., /images/* and /videos/*).
This establishes that path-based routing is required rather than basic routing or multi-site hosting.
2
Select the routing rule type.
Choose a path-based routing rule type on the Application Gateway.
Basic routing rules only route traffic based on host header or port, whereas path-based rules allow URL-path matching rules.
3
Configure the path map and default target.
Add path rules for /images/* mapping to PoolImages and /videos/* mapping to PoolVideos, and assign PoolDefault as the default backend target.
A path-based rule requires a default target to handle any requests that do not match the specified paths.

Key Concept

Application Gateway Path-based routing rules
Rate this question